package HighMethod02;

/**
 * 顺序二叉树
 * 二叉链表
 * 三叉链表
 */
class BinaryTree {
    class BtNode {
        BtNode leftChid;
        BtNode rightChid;
        int data;
    }

    private BtNode root;

    public BinaryTree() {
        root = null;
    }

    public void PreTaversal(BtNode btNode) {

        BtNode left = btNode.leftChid;
        BtNode right = btNode.leftChid;

        if (left == null) {
            System.out.print(btNode.data + " ");
        } else if (right == null) {
            System.out.print(btNode.data + " ");
        }else{
            System.out.print(btNode.data + " ");
        }

        PreTaversal(left);
        PreTaversal(right);

    }

    public void InTaversal() {

    }

    public void LastTaversal() {

    }

}


public class test03BinaryTree {


    public static void main(String[] args) {


    }
}
